package site.lanmushan.validation.annotation;

import site.lanmushan.validation.validator.PhoneValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 验证字符
 *
 * @author Administrator
 */
@Documented
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
//@Repeatable(PasswordPatten.List.class)
@Constraint(validatedBy = {PhoneValidator.class})
public @interface Character {
    String message();

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    /**
     * 允许的字符接
     * @return
     */
    String[] allow();

    String[] notAllow();

    String allowChar();

    String notAllowChar();
}
